\section{State of the Art !!TO BE CHANGED!!}\label{sec:automatedTesting}
\noindent
Currently, the execution of the automated testing that is done by these companies results to be very positive and efficient in terms of time saving, test coverage and project development acceleration. Regardless the result, these companies are still strongly researching their best approach to improve their testing experience, since in the presence state mainly only functional requirements are tested to the detriment of non-functional requirement. Then, with the aim to face this missing, they are working in collaboration with other research groups and organizations to introduce in their testing methods some additional testing techniques, such as the fault injection that might be helpful to improve both the system communication level and application level.\\
Looking the overall picture of software developed at the current state, during the last years, the quality of software is indisputable improved. But on the other hand, as it is not enough, the complexity of systems is growing even more and also the demand for reliable software and shorter SDLCs is growing as well. Therefore, the need to model and simulate a system is becoming day after day a primary necessity for companies to challenge the market demand. So, with the aim to remain competitive, the use of third tools for the simulation and modelling has become a requirement to achieve faster and better results \cite{ModSysEmbSys}.\\
Ultimately, the tendency of above mentioned companies and those involved in complex real-time embedded systems is the introduction of further development and testing techniques, such as Model-in-the-Loop (MIL), Software-in-the-Loop (SIL), Hardware-in-the-Loop (HIL) and Fault Injection.


\subsection{Fault Injection}
Fault injection is a technique that has started to become popular in the testing area since the 1970s for its capability to improve the robustness of the system under test. Initially, it was recognized as a testing technique used at hardware level; whereas today, it is recognized also as a powerful technique used in SDLC. Moreover, since the improvement made by using this testing technique is significant, companies are becoming interested in using it also on simulated environments \cite{FaultInjection}.\\
The main benefit of fault injection is the increment of the robustness of the software, accelerating the propagation and occurrence of faults by injecting code into the software during the Compile-Time or Runtime of the software. Moreover, another important benefit that is indirectly brought from the code injection is the enhancement of the test coverage, because when new faults are discovered, they are corrected and usually path codes that are affected by these faults are covered with new test cases.


\subsection*{Model, Software and Hardware in the Loop}
MIL, SIL and HIL simulations are techniques that are used for the development and testing of complex real-time embedded systems. They have been introduced less than twenty years ago in the aviation industry and nowadays have been widespread across different areas, such as the vehicle one. Their introduction is mainly due to the need for companies to reduce the time-to-market, enhance the quality of the testing and then final products, improve the safety, tight development schedules, high-burden-rate plan and early the development process \cite{HIL}.\\
MIL, SIL and MIL provide an advanced platform that enables developers and testers to start the development and testing of the software in parallel with the hardware, bringing the advantages to reduce delivery time, scalability and costs. Furthermore, it allows an accurate test of all SUT functionalities, due to the possibility to perform tests that are destructive, dangerous, timing uncontrolled, etc. Differently from the previous case study, the use of this platform has the particular advantages that the system is execute in real time and then no timing issues can falsify the real behaviour of hardware.
In Figure \ref{mil_sil_hil} is shown a general architecture of the MIL, SIL and HIL platform, which depicts how included components interact among them.
 
\begin{figure}[h!]
\centering
\includegraphics[scale=0.8]{images/mil_sil_hil.png}
\caption{MIL, SIL and HIL architecture \cite{ModSysEmbSys}.}
\label{mil_sil_hil}
\end{figure}

\textbf{MIL} is used for developing and testing the System Model by using a Simulation Model. The latter is frequently made with tool like MathWorks' Simulink and Stateflow that provide a modelling and simulation environment and analysis tools that can be integrated into a workflow. At this stage, a fast development occurs so that applying small changes to the controller the system can immediately to be tested \cite{ModSysEmbSys}.\\
\textbf{SIL} is used for testing the System Application by using a Simulated Application that is usually written in languages like C or C++ \cite{ModSysEmbSys}.\\
\textbf{HIL} is mainly used for testing a Real Time System by using a Simulated System. The simulation of the hardware behaviour is here considered a practice where even smallest or difficult hardware behaviours have to be simulated by adding mathematical representations, in order to make an accurate simulator that reflects as much as possible the real system. HIL represents the case where the whole system is running on a real-time computer with IO simulations with the aim to fool the controller into believing that it is installed on the real plant \cite{ModSysEmbSys}\cite{HIL}.